package com.winit.common.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;

/**
 * 定时任务
 *
 * @author wangjian
 */
@Component
public class Schedule {

    private static Logger log = LoggerFactory.getLogger(Schedule.class);

    @Scheduled(cron = "0/10 * * * * ?")
    public void test() {
        log.info("Schedule job start:" + new Date());
        log.info("Schedule job end:" + new Date());
    }

}
